Key telephone system and maintenance method therefor

ABSTRACT

There is described a key telephone system which enables rewriting of the main program of the key telephone system, recovery of the key telephone system from a failure, and maintenance of the key telephone system such as diagnosis in an immediate, flexible, and inexpensive manner, a maintenance method for the key telephone system, and a medium on which is recorded a program for carrying out the maintenance method. A program to be rewritten is downloaded from an external device to a second storage means. After an existing program of a storage means has been saved into the second storage means, the downloaded program stored in the second storage means is transmitted and rewritten into the storage means. Failure information recording means records information regarding at least failures that occur at the time of downloading the program, failures that occur at the time of saving the existing program, and failures that occur at the time of rewriting the downloaded program. In the event of a failure, the key telephone system recovers from a failure by reference to the failure information recorded by the, failure information recording means.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to a key telephone system(hereinafter often referred to simply as “KTS”), a maintenance methodtherefor, and a medium on which is recorded a program for executing themaintenance method. More particularly, the present invention relates toa key telephone system which immediately and flexibly performs, at lowcost and through remote control, a change in the main program of the keytelephone system, recovery from failures, and maintenance operationssuch as diagnosis; to a maintenance method for the key telephone system;and to a medium for recording a program for executing the maintenancemethod.

[0003] 2. Description of the Related Art

[0004] Like a private branch exchange (PBX), various key telephonesystems have already been proposed as a system for providing businessusers with telephone exchange service. The PBX originated as an exchangefor connecting private telephone lines, and during the course of itsdevelopment a function of connecting the private telephone lines to atelephone network has been added to the PBX. Ir. contrast, the keytelephone system originated from the idea of making convenientconnection to the telephone network through use of a plurality oftelephone sets; for example, through switching of branch telephones. Thefunction of intercommunication between extensions was later added to thekey telephone system. In recent years, there has been no definitedistinction between the PBX and the KTS, and a choice between the PBXand the KTS is a mere matter of the user's preference.

[0005]FIG. 8 shows the configuration of a telephone network system usingsuch key telephone systems. A conventional key telephone system 101 hastwo built-in CPU cards 111, 112, in that the CPU card 111 is used as amain CPU card and the CPU card 112 is used as a standby CPU card. TheKTS 101 further comprises a built-in analog/digital extension card 113to be used as an extension interface card and a built-in analog/digitaloutside line card 114 to be used as an outside line interface card.These four cards 111 to 114 are connected together by way of a systembus and a system PCM highway 115.

[0006] The KTS 101 is connected to an analog/digital network 103 by wayof the analog/digital outside line card 114 and is further connected toa maintenance site 102 by way of the analog/digital network 103. Themaintenance site 102 is made up of a MODEM/TA (modem or a terminaladapter) 51 and a PC (personal computer) 52 and performs maintenanceremotely.

[0007] The maintenance of such a conventional KTS 101 will now bedescribed. The main program of the KTS 101 is changed on-site throughoperations such as exchange of memory, or a CPU card, of the KTS 101.Recovery of the KTS 101 from failures is performed by remotely switchingthe CPU card 111 to the standby CPU card 112. Further, the KTS 101 isdiagnosed by means of operations performed through a digital telephoneset or personal computer disposed at the client's location. To remotelydiagnose the KTS 101, a diagnostic program incorporated into the KTS 101beforehand is activated, and the result of such diagnosis is remotelytransmitted to equipment installed at a remote site.

[0008] As mentioned above, with regard to the conventional key telephonesystem and the maintenance method therefor, and the medium for recordingthe program for executing the maintenance program, remotely changing themain program of the key telephone system requires two CPU cards, i.e.,the main CPU card and the standby CPU card, thereby increasing the costof the key telephone system. Further, providing two CPU cards to a keytelephone system which usually operates through use of a single CPU cardis wasteful even in terms of system configuration.

[0009] To remotely diagnose the key telephone system, one type ofdiagnostic program previously incorporated into the key telephone systemis activated irrespective of system configuration. Accordingly, flexibleand immediate activation of a relevant diagnostic program correspondingto the installation conditions of the key telephone system or to thenature of failure has been impossible. Further, if maintenance personaldesires to change the built-in diagnostic program of the key telephonesystem, the CPU cards of the key telephone systems disposed at theclient's location must be exchanged, thereby requiring an enormousamount of time and money.

SUMMARY OF THE INVENTION

[0010] The present invention has been achieved in view of the foregoingcircumstances of the conventional key telephone system, and the objectof the present invention is to provide a key telephone system, amaintenance method for the key telephone system, and a medium forrecording a program for executing the maintenance method. They enablerewriting of a main program of the key telephone system, recovery fromfailures, and maintenance operations such as diagnosis, in an immediate,flexible, and inexpensive manner by remote control.

[0011] To solve the foregoing problems, according to a first aspect ofthe present invention, there is provided a key telephone systemcomprising: first storage means which stores a program of the keytelephone system; operation control means which operates and controlsthe key telephone system through execution of the program stored in thefirst storage means; second storage means which stores a program;downloading means which downloads an alternative program to be rewrittenfrom an external device to the second storage means; and control meanswhich saves the program stored in the first storage means into thesecond storage means and which transmits and rewrites the alternativeprogram stored in the second storage means to the first storage means.

[0012] According to a second aspect of the present invention, there isprovided a key telephone system comprising: first storage means whichstores a program of the key telephone system; operation control meanswhich operates and controls the key telephone system through executionof the program stored in the first storage means; second storage meanswhich stores a program; downloading means which downloads an alternativeprogram to be rewitten from an external device to the second storagemeans; control means which saves the program stored in the first storagemeans into the second storage means and which transmits and rewrite thealternative program stored in the second storage means to the firststorage means; failure information recording means which recordsinformation regarding at least failures that occur during thedownloading of the alternative program by the downloading meant andfailures that occur during the saving, transmitting and writing of thealternative program over the program stored in the first storage meansby the control means; and recovery means which recovers the keytelephone system by reference to the failure information recorded in thefailure information recording means in case of occurrence of failure.

[0013] According to a third aspect of the present invention, there isprovided a key telephone system comprising: first storage means whichstores a program of the key telephone system; operation control meanswhich operates and controls the key telephone system through executionof the program stored in the first storage means; second storage meanswhich stores a diagnostic program; downloading means which downloads analternative diagnostic program from an external device to the secondstorage means; control means which saves a diagnostic program havingbeen stored in a first area in the second storage means into a secondarea in the second storage means and which transmits and rewrites thealternative diagnostic program stored in the second area of the secondstorage means to the first area; diagnostic means which diagnoses thestate of a line connected to the key telephone system according to adiagnostic program stored in the first area of the second storage means,through transmission and receipt of a signal.

[0014] Preferably, the second storage means, the downloading means, thecontrol means, the failure information recording means, and the recoverymeans or the diagnostic means are assembled into a single module andhandled, as such.

[0015] Preferably, the result of processing performed by the controlmeans, and the failure information recorded in the failure informationrecording means or the result of diagnosis performed by the diagnosticmeans, are noticed to the external device.

[0016] Preferably, the external device is connected to the key telephonesystem by way of an analog or digital network, so that the key telephonesystem is remotely controlled.

[0017] According to a fourth aspect of the present invention, there isprovided a method of performing maintenance of a key telephone systemincluding storage means which stores a program and operation controlmeans which operates and controls the key telephone system throughexecution of the Program stored in the storage means, the key telephonesystem maintenance method comprising: a download step for downloadingfrom an alternative program to be rewritten from an external device to asecond storage means; a saving step for saving the program stored in thestorage means into the second storage means; and a rewriting step fortransmitting and rewriting the alternative program stored in the secondstorage means into the storage means through transmission.

[0018] According to a fifth aspect of the present invention, there isprovided a method of performing maintenance on a key telephone systemincluding storage means which stores a program and operation controlmeans which operates and controls the key telephone system throughexecution of the program stored in the storage means, the key telephonesystem maintenance method comprising: a download step for downloading analternative program to be rewritten from an external device to secondstorage means; a saving step for saving the program stored in thestorage means into the second storage means; a rewriting step fortransmitting and rewriting the alternative program stored in the secondstorage means into the storage means through transmission; a failureinformation recording step for recording information regarding at leastfailures that occur in the download step, the saving step, and theoverwriting step, and a recovery step for recovering the key telephonesystem by reference to the failure information recorded in the failureinformation recording step.

[0019] According to a sixth aspect of the present invention, there isprovided a method of performing maintenance of a key telephone systemincluding storage means which stores a program and operation controlmeans which operates and controls the key telephone system throughexecution of the program stored in the storage means, the key telephonesystem maintenance method comprising: a download step for downloading aprogram to be changed from an external device to second storage means; asaving step for saving the existing program stored in a first area ofthe second storage means into a second area of the second storage means;a rewriting step for transmitting and rewriting the alternative programstored in the second area of the second storage means into the firstarea of the storage means; and a diagnosing step for diagnosing thestate of a line connected to the key telephone system according to adiagnostic program stored in the second storage means, throughtransmission and receipt of a signal.

[0020] Preferably, the result of processing performed by the controlmeans, and the failure information recorded in the failure informationrecording means or the result of diagnosis performed by the diagnosticmeans are communicated to the external device.

[0021] Preferably, the external device is connected to the key telephonesystem by way of an analog or digital network, so that the key telephonesystem is remotely controlled.

[0022] Preferably, the key telephone system maintenance method is storedin a computer-readable recording medium in the form of a program forcausing a computer to execute the key telephone system maintenancemethod.

[0023] In the foregoing key telephone system, key telephone systemmaintenance method, and recording medium, the download means downloadsan alternative program to be rewritten to the second storage means fromthe external device (in the download step), and the control means savesthe program stored in the first storage means into the second storagemeans (in the saving step) The control means rewrites the alternativeprogram stored in the second storage means into the first storage means(in the rewriting step). As a result, the alternative program stored inthe second storage means is transmitted to and rewritten into the firststorage means. Compared with conventional changing of a program throughon-site replacement of memory or a CPU card, a program can be changedwithout involving massive amounts of time and money. Further, theprogram according to which operations of the key telephone system arecontrolled can be changed immediately and inexpensively.

[0024] Further, in the foregoing key telephone system, key telephonesystem maintenance method, and recording medium, the download meansdownloads from the external device an alternative program to berewritten into the second storage means (in the download step), and thecontrol means saves into the second storage means the program stored inthe first storage means (in the saving step). The control meanstransmits and rewrites the downloaded alternative program stored in thesecond storage means into the first storage means (in the rewritingstep). The failure information recording means (in the failureinformation recording step) records information regarding at leastfailures that occur by the downloading action of the download means (inthe download step), failures that have been caused by the saving actionof the control means (in the saving step), and failures that have beencaused by the rewriting action of the control means (in the rewritingstep) Further, in the event of a failure, the recovery means recoversthe key telephone system (in the recovery step) by reference to thefailure information recorded by the failure information recording means(in the failure information recording step). As a result, by referenceto the recorded failure information, a decision is made as to when thefailure occurred; i.e., in the download step, in the saving step, and inthe rewriting step. The rewriting of the main program can be resumedfrom the processing step in which the failure occurred. So long as afterrecovery of the key telephone system the processing is resumed from theprocessing step in which the failure occurred, the time required forrewriting the program can be eventually shortened. Further,self-recovery functions are provided to the key telephone systembeforehand so as to correspond to various failures, so that the keytelephone system is prevented from being inactive at the time of variousmaintenance operations.

[0025] Further, in the foregoing key telephone system, key telephonesystem maintenance method, and recording medium, the download meansdownloads from the external device a program to be changed in the secondstorage means (in the download step), and the control means saves theexisting program stored in a first area of the storage means intoanother memory location of the second storage means (in the savingstep). The control means rewrites the existing program in the secondstorage means with the diagnostic program downloaded in the secondstorage means. According to the diagnostic program stored in the secondstorage means, the diagnostic means diagnoses the state of a lineconnected to the key telephone system through transmission and receiptof a signal (in the diagnosing step). Thus, the existing diagnosticprogram previously stored in the second storage means or an arbitrarydiagnostic program downloaded from an external device is executed. As aresult, even when a key telephone system is installed in a remotelocation, a failure of the key telephone system can be diagnosed. Morespecifically, the key telephone system can be immediately andinexpensively diagnosed without direct dispatch of a maintenancetechnician to the location where the key telephone system is installed.Further, since the diagnostic program can be changed by way of theexternal device, a relevant diagnostic program corresponding to thelocation—the installation conditions of the key telephone system and afailure of the key telephone system—can be immediately and flexiblyactivated.

[0026] In the foregoing key telephone system, the second storage means,the downloading means, the control means, the failure informationrecording means, and the recovery means or the diagnostic means areassembled into a single module and handled, as such. So long as themodule is, for example, implemented in the form of a card or mounted ona printed board having a predetermined shape, the handling of the modulecan be facilitated during maintenance, thereby facilitating, e.g.,replacement of the module. In contrast with a conventional key telephonesystem having a standby CPU card, the conventional key telephone systemaccording to the present invention has another card in place of thestandby CPU card. The card according to the present invention enablesfulfilling of various types of maintenance functions. Compared with theconventional key telephone system, the key telephone system according tothe present invention enables more efficient utilization of space (orthe volume occupied by the card).

[0027] Further, in the foregoing key telephone system, key telephonesystem maintenance method, and recording medium, the result ofprocessing performed by the control means (in the rewriting step), andthe failure information recorded in the failure information recordingmeans (in the failure information recording step) or the result ofdiagnosis performed by the diagnostic means (in the diagnostic step) arepreferably communicated to the external device. As a result, thechanging of the program of the key telephone system, the recovery of thekey telephone system from a failure, and system diagnosis can beflexibly and immediately carried out without direct dispatch of amaintenance technician to the location where the key telephone system isinstalled.

[0028] Further, in the foregoing key telephone system, key telephonesystem maintenance method, and recording medium, the external device ispreferably connected to the key telephone system by way of an analog ordigital network, so that the key telephone system is remotelycontrolled. As a result, the changing of the program of the keytelephone system, the recovery of the key telephone system from afailure, and system diagnosis can be flexibly and immediately carriedout without direct dispatch of a maintenance technician to the locationwhere the key telephone system is installed. Therefore, compared withthe maintenance of a conventional key telephone system which wouldrequire an enormous amount of time and money, the maintenance of the keytelephone system according to the present invention can be performedwith minimum expenditure of time and money. dr

BRIEF DESCRIPTION OF THE DRAWINGS

[0029]FIG. 1 is a schematic diagram showing the configuration of a keytelephone system according to one embodiment of the present invention;

[0030]FIG. 2 is a schematic diagram showing the configuration of atelephone network system using the key telephone system according to thepresent embodiment;

[0031]FIG. 3 is a flowchart for describing the rewriting of a mainprogram of the key telephone system according to the present embodiment;

[0032]FIG. 4 is a diagrammatic representation for describing theconfiguration of bits of a failure flag register;

[0033]FIG. 5 is a flowchart for describing recovery of the key telephonesystem from a failure according to the present embodiment;

[0034]FIG. 6 is a flowchart for describing rewriting of a diagnosticprogram of the key telephone system according to the present embodiment;

[0035]FIG. 7 is a flowchart for describing diagnostic processing of thekey telephone system according to the present embodiment; and

[0036]FIG. 8 is a diagrammatic representation showing a telephonenetwork system using a conventional key telephone system.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0037] A key telephone system, a maintenance method therefor, and amedium for recording a program for executing the maintenance method,according to the present invention will now be described in detail byreference to the accompanying drawings. In the preferred embodiments,there is given a detailed explanation of the key telephone system and amaintenance method therefor according to the present invention. However,a recording medium according to the present invention records a programfor executing the maintenance method, and hence its explanation isincluded in the explanation of the maintenance method, which will beprovided later.

[0038]FIG. 1 is a schematic diagram showing a key telephone system,according to one embodiment of the present invention, to which amaintenance method is applied. FIG. 2 is a schematic diagram showing atelephone network system using the key telephone system according to thepresent embodiment.

[0039] In FIGS. 1 and 2, a key telephone system (hereinafter referred tosimply as “KTS”) 1 according to the present embodiment substantiallycomprises a CPU card 11, a maintenance card 12, an analog/digitalextension card 13 to be used as an extension interface card, and ananalog/digital outside line card 14 to be used as an outside line card.These four cards 11 to 14 are connected together by way of a system bus15 and a system PCM highway 16.

[0040] In FIG. 2, the KTS 1 is connected to an analog/digital network 3by way of the analog/digital center office line card 14 and is furtherconnected to a maintenance site 2 by way of the analog/digital network3. The maintenance site 2 comprises a MODEM/TA (modem or terminaladapter) 51 and a PC (personal computer) 52 and remotely performsmaintenance of the KTS 1 from the outside; namely, a change in the mainprogram of the KTS 1, the recovery of the KTS 1 from a failure, a changein a diagnostic program, or a diagnosing operation performed by thediagnostic program.

[0041] Subsequently, the configuration of the CPU card 11, themaintenance card 12, the analog/digital extension card 13, and theanalog/digital outside line card 14, which constitute the KTS 1, isdescribed in detail with reference to EIG. 1. The analog/digitalextension card 13 and the analog/digital outside line card 14 are equalin configuration to those used in the conventional example, and henceexplanation of their detailed configurations will be omitted here.

[0042] First, the CPU card 11 comprises a CPU 21 for controlling theoverall operations of the KTS 1, memory 22 for retaining a main programor preset data for respective functions; an I/O control section 23 forcontrolling input/output of signals between the CPU 21 and peripheralcircuits thereof; a time switch (hereinafter abbreviated as “TSW”) forcontrolling a call; and a system I/F section 25 which controls interfacebetween the KTS 1 and another card. These constituent elements areconnected together by way of a card internal bus 28.

[0043] The maintenance card 12 comprises a CPU 31 for controllingoperations of the maintenance card 12; memory 32 which retains aprogram, such as a diagnostic program, to be executed by the CPU 31 anddata sets to be used for effecting various functions and which ensuresan area into which the main program of the CPU 21 is downloaded orsaved; an I/O control section 33 for controlling input and output ofsignals between the CPU 31 and peripheral circuits thereof; amulti-frequency receiving section 35 (hereinafter abbreviated as “MFR”)for receiving various tone signals; a PB signal sender 37 for sendingvarious tone signals; a serial-to-parallel converter 34 for convertingPCM serial data into parallel data; a modem (MODEM) 36 for governingmodem communication performed by way of an analog outside line; and adigital extension I/F section 38 for governing interface between the KTS1 and another card. These constituent elements are connected together byway of a card internal bus 48 and a PCM highway 49.

[0044] With regard to the KTS 1 according to the present embodimenthaving the foregoing constitution, the remote maintenance function ofthe KTS 1 will be described in detail, for the respective functions of achange in the main program, recovery of the KTS 1 from a failure, achange in the diagnostic program, and diagnostic processing. In thepresent embodiment, a term “external device” referred to in appendedclaims of the present patent specification corresponds to themaintenance site 2. Similarly, a term “storage means” referred to in theappended claims corresponds to the memory 22 of the CPU card 11; and aterm “operation control means” referred to in the appended claimscorresponds to the CPU 21 of the CPU card 11. Further, a term “secondstorage means” referred to in the appended claims corresponds to thememory 32 of the maintenance card 12; and a term “downloading means”referred to in the appended claims corresponds to the CPU 31, the I/Ocontrol section 33, the digital extension I/F section 38, and theserial-to-parallel conversion section 34 or the MODEM 36 of themaintenance card 12. Further, a term “control means” referred to in theappended claims corresponds to the CPU 31, the I/O control section 33,and the digital extension I/F section 38 of the maintenance card 12.

[0045] First, the first remote maintenance function of the KTS 1, i.e.,changing of the main program of the CPU 21, will be described in detailby reference to FIG. 3.

[0046] In step S201, the PC 52 disposed at the maintenance site 2selects a main program to be changed. In step S202, the main program tobe changed is downloaded to the memory 32 of the maintenance card 12 byway of the digital/analog network 3. More specifically, thethus-selected main program is delivered to the analog/digital outsideline card 14 by means of the MODEM/TA 51 through modem communication orB-channel data communication of the digital network. The thus-deliveredsignal is transmitted to the maintenance card 12 by means of control ofthe CPU 21, the I/O control section 23, the TSW 24, and the system busI/F control section 25.

[0047] When a signal arrives at the KTS 1 over the analog network 3, thesignal is delivered to the MODEM 36 by means of control of the CPU 31,the I/O control section 33, and the digital extension I/F section 38 ofthe maintenance card 12. Subsequently, the data set that has arrived atthe MODEM 36 is stored in the memory 32 by means of the CPU 31 and theI/O control section 33. In contrast, when a signal arrives at the KTS 1over the digital network 3, the signal is delivered to theserial-to-parallel converter 34 by means of control of the CPU 31, theI/O control section 33, and the digital extension I/F section 38 of themaintenance card 12. Subsequently, the thus-converted parallel data setis stored in the memory 32 by way of the CPU 31 and the I/O controlsection 33.

[0048] Upon completion of downloading of the data set through datacommunication by way of the analog/digital network 3, a decision is madein step S203 as to whether or not the KTS 1 is in an idle state. Whenthe KTS 1 enters an idle state, all the ports of the analog/digitalextension card 13 and the analog/digital outside line card 14 and thefunctions of the KTS 1 are deactivated in step S204 by means of controlof the CPU 31, the I/O control section 33, and the digital extension I/Fsection 38.

[0049] After deactivation of the functions of the KTS 1, in step S205the main program of the CPU 21 stored in the memory 22 of the CPU card11 is saved in the memory 32 of the maintenance card 12 by means ofcontrol of the CPU 21, the I/O control section 23, the TSW 24, and thesystem bus control section 25 of the CPU card 11 and by means of controlof the CPU 31, the I/O control section 33, and the digital extension I/Fsection 38 of the maintenance card 12.

[0050] After completion of saving of the main program, the main programdownloaded and stored in the memory 32 of the maintenance card 12 istransferred to and rewritten in the memory 22 of the CPU card 11, bymeans of control of the CPU 21, the I/O control section 23, the TSW 24,and the system bus I/F control section 25 of the CPU card 11 and bymeans of control of the CPU 31, the I/O control section 33, and thedigital extension I/F section 38 of the maintenance card 12.

[0051] After completion of rewriting of the main program in the memory22 of the CPU card 11, the KTS 1 is started up again in step S207 bymeans of control of the CPU 21. After the KTS 1 has been started upagain, the result of changing of the main program is notified to the PC52 of the maintenance site 2 through B-channel data communication overthe digital network or modem communication by way of the analog/digitalnetwork 3 and the MODEM/TA 51 under control of the CPU 21, the I/Ocontrol section 23, the TSW 24, and the system bus I/F control sectionof the CPU card 11 and under control of the analog/digital outside linecard 14. Consequently, the changing of the main program is completed.

[0052] As mentioned above, as a result of changing of the main programof the CPU 21, which is one of the remote maintenance functionsaccording to the present embodiment, in contrast with conventionalchanging of a main program which is performed through on-site exchangeof memory or a CPU card, the main program can be changed withoutinvolving an enormous amount of cost and consumption of much time.Further, the main program is changed in the present embodiment throughthe procedures, i.e., a downloading step, a saving step, and a rewritingstep. Accordingly, the analog/digital network 3 is used at the time ofonly program downloading and communication of changing results. The timeduring which the analog/digital network 3 is used can be minimized,thereby enabling effective use of a communications line. Further, themaintenance card 2 actively changes the main program when the KTS 1 hasentered an idle state, thereby enabling effective utilization of a lineand minimizing the influence of changing of the main program on theoriginal operations of the KTS 1.

[0053] Next, the second remote maintenance function of the KTS 1according to the present embodiment, i.e., the recovery of the KTS 1from a failure, will be described in detail by reference to FIGS. 4 and5. An explanation will now be given of recovery of the KTS 1 from apower failure that occurs during the changing of the main program of theCPU 21.

[0054] As mentioned above, in the first processing step, a main programto be changed is downloaded into the maintenance card 12 from the PC 52of the maintenance site 2 by way of the MODEM/TA 51, the analog/digitalnetwork 3, and the analog/digital outside line card 14 of the KTS 1. Inthe second processing step, the main program stored in the memory 22 ofthe CPU card 11 is save into the memory 32 of the maintenance card 12.In the third processing step, the main program to be rewritten that hasbeen downloaded into the memory 23 of the maintenance card 12 istransmitted to and rewritten in the memory 22 of the CPU card 11.

[0055] The recovery of the KTS 1 from a failure requires failureinformation recording means which records information regarding failuresthat occurs during the downloading operation, the saving operation, andthe rewriting operation. A failure flag register 39 provided in the I/Ocontrol section 33 of the maintenance card 12 corresponds to the failureinformation recording means. The failure flag register 39 is constitutedof flash memory in which stored data sets are not erased in the event ofshutting off of power to the failure flag register 39. Further, recoverymeans corresponds to the CPU 31 of the maintenance card 12.

[0056]FIG. 4 shows the configuration of bits of the failure flagregister 39. The 0th bit is defined as a download failure flag DLEFwhich is set in the event of a failure occurring during a downloadingoperation; the 1st bit is defined as a main saving failure flag MEEFwhich is set in the event of a failure occurring during the saving ofthe main program; and the 2nd bit is defined as a main rewrite failureflag OWEF which is set in the event of a failure occurring during therewriting of the main program. The 3rd to 7th bits are undefined. Asused herein, a failure is assumed to be a mismatch between data setsdetected through comparison of the data sets in the event of a powerfailure during or after saving of the main program. In the presentembodiment, although one bit of the failure flag register 39 is assignedto a failure occurring in each processing step, a plurality of bits areassigned to a failure occurring in each processing step., As a result,recovery of the KTS 1 from a failure can be carried out flexibly so asto correspond to the failure.

[0057] As shown in FIG. 5, in step S302, a check is made as to which offailure flags is flagged by reference to the failure flag register 39provided in the I/O control section 33 of the maintenance card 12 (instep S301). If it has been found in step S302 that a failure flag isset, the processing proceeds to step S313. The existing main program istransmitted to the memory 22 of the CPU card 11 from the memory 32 ofthe maintenance card 12, thereby recovering the KTS 1 from the failure.In step S314, the KTS 1 is started up again by control of the CPU 21,and the KTS 1 is recovered according to the existing main program. Amessage declaring the occurrence of a failure is communicated to the PC52 of the maintenance site 2 by means of B-channel data communication ofa digital network or modem communication by way of the analog/digitalnetwork 3 and the MODEM/TA 51 by means of control of the CPU 21, the I/Ocontrol section 23, the TSW 24, and the system bus I/F section 25 of theCPU card 11 and by means of control of the analog/digital outside linecard 14.

[0058] Further, if no failure flag is set in step S302, the processingproceeds to step S303, where a download failure flag DLEF is set in thefailure flag register 39 provided in the I/O control section 33 undercontrol of the CPU 31 before the main program to be rewritten isdownloaded into the maintenance card 12 as the first error recoveryprocessing. Subsequently, in step S304, the main program is downloadedinto the memory 32 of the maintenance card 12. If power is shut offduring the downloading of the main program in step S305 or if there isdetected a mismatch between a main program before downloading and a mainprogram after downloading through comparison after completion ofdownloading of the main program, the download failure flag DLEF remainsset in the failure flag register 39. In step S305, a decision is made asto whether or not a failure has occurred during a downloading operation.If a failure has occurred, the existing main program is restored in stepS313, and a failure notice is communicated to the maintenance site 2 instep S314. Further, when it is judged in step S315 that no failure hasoccurred during the downloading of the main program, the processingproceeds to step S306 and subsequent steps, wherein the existing mainprogram is saved.

[0059] In step S306, a main saving failure flag MEEF is set in thefailure flag register 39 provided in the I/O control section 33 undercontrol of the CPU 31 before the main program stored in the CPU card 11is saved in the memory 32 of the maintenance card 12 as the second errorrecovery processing. In step S307, the main program is saved in thememory 32 of the maintenance card 12. If power is shut off at the timeof saving operations in step S307 or if there is detected a mismatchbetween the main program before saving and the main program after savingthrough comparison after completion of saving of the main program, themain saving failure flag remains set in the failure flag register 39. Instep S308, a decision is made as to whether or not a failure hasoccurred during saving of the main program. If a failure has occurred,the existing main program is restored in step S313, and a failure noticeis communicated to the maintenance site 2 in step S314. Further, when itis judged in step S308 that no failure has occurred during the saving ofthe main program, the processing proceeds to step S309 and subsequentsteps, wherein the main program is rewritten.

[0060] In step S309, the main rewrite failure flag OWEF is set in thefailure flag register 39 provided in the I/O control section 33 undercontrol of the CPU 31 before the main program to be rewritten that hasbeen downloaded in the memory 32 of the maintenance card 12 istransmitted to the memory 22 of the CPU card 11 as the third errorrecovery processing. In step S310, the main program is rewritten in thememory 22 of the CPU card 11. If power is shut off during the rewritingof the main program in step S310 or if there is detected a mismatchbetween the main program before rewriting and the main program afterrewriting through comparison after rewriting of the main program, themain rewrite failure flag OWEF remains set in the failure flag register39. Further, a decision is made in step S311 as to whether or not afailure has occurred during rewriting of the main program. If a failurehas occurred, the existing main program is restored in step S313, and afailure notice is communicated to the maintenance site 2 in step S314.Further, when it is judged in step S311 that no failure has occurredduring the rewriting of the main program, the processing proceeds tostep S312, where the failure flags DLEF, MEEF, and OWEE set in thefailure flag register 39 provided in the I/O control section 33 arereset under control of the CPU 31.

[0061] As mentioned above, even if a failure arises during the rewritingof the main program, the KTS 1 can recover from the failure by means ofthe existing main program through the failure recovery processing whichis one of the remote maintenance functions according to the presentembodiment. Further, the CPU 31 monitors the contents of the failureflag register 39 provided in the I/O control section 33 and can judgewhen the failure has occurred; i.e., in the download step, in the savingstep, or in the rewriting step. As a result, the rewriting of the mainprogram can be resumed from the process in which the failure occurred.Further, since the rewriting operation is resumed from the process inwhich the failure occurred, the time required for completing rewritingof the main program can be shortened. Moreover, even when a failureoccurs in any of the processes of rewriting the main program (i.e., inthe download step, the saving step, or the rewriting step), the KTS 1can start up again and recover from the failure by means of the existingmain program.

[0062] Next, the third remote maintenance function of the KTS 1according to the present embodiment, i.e., the rewriting of thediagnostic program and the diagnostic processing performed by thediagnostic program, will be described in detail by reference to FIGS. 6and 7. Here, it is assumed that an existing diagnostic program is storedin a predetermined area of the memory 32 of the maintenance card 12. Aterm “diagnostic means” referred to in the appended claims correspondsto a MFR 35 and a PB signal sender 37.

[0063] The rewriting of the diagnostic program stored in the memory 32of the maintenance card 12 will be described by reference to FIG. 6. Instep S401, the PC 52 provided at the maintenance site 2 selects adiagnostic program to be rewritten. In step S402, the thus-selecteddiagnostic program is downloaded into another memory location of thememory 32 of the maintenance card 12 by way of the analog/digitalnetwork 3. The downloading of the diagnostic program is identical withthe downloading of the main program.

[0064] In step S403, the existing diagnostic program stored in thememory 32 is saved in another memory location of the memory 32 undercontrol of the CPU 31 of the maintenance card 12. After completion ofsaving of the existing diagnostic program, the existing diagnosticprogram stored in the memory 32 is rewritten with the downloadeddiagnostic program to be rewritten under control of the CPU 31 of themaintenance card 12 in step S404.

[0065] Upon completion of rewriting of the diagnostic program, a programrewrite completion notice is communicated to the CPU card 11 in stepS405 under control of the CPU 31, the I/O control section 33, and thedigital extension I/F control section 38 of the maintenance card 12.Subsequently, the result of rewriting of the diagnostic program iscommunicated to the PC 52 of the maintenance site 2 by way of theanalog/digital network 3 and the MODEM/TA 51 over B-channel datacommunication of a digital network or modem communication by means ofcontrol of the CPU 21, the I/O control section 23, the TSW 24, and thesystem bus I/F section 25 of the CPU card 11 and by means of control ofthe analog/digital outside line card 14. As a result, the rewriting ofthe diagnostic program is completed.

[0066] The diagnostic processing according to the present embodimentwill now be described by reference to FIG. 7. FIG. 7 is a flowchartshowing ordinary diagnostic procedures. Instep S501, an arbitrarydiagnostic program rewritten in the memory 32 of the maintenance card 12by means of the existing diagnostic program or through the foregoingrewriting operations is periodically started up under control of the CPU31.

[0067] In step S511, a PB signal is sent from the PB signal sender 37 tothe analog/digital extension card 13 or the analog/digital outside linecard 14. In step S512, the MFR 35 detects a dial tone signal when theKTS 1 is connected to an analog/digital extension line or outside line.In step S513, under control of the I/O control section 33 and the MFR35, a decision is made as to whether the thus-detected dial tone signalis normal or abnormal.

[0068] After completion of diagnosis of all the analog/digital extensionlines or outside lines, the result of diagnosis is communicated to thePC 52 by way of the analog/digital network 3 and the MODEM/TA 51 overB-channel data communication of a digital network or modem communicationby means of control of the CPU 21, the I/O control section 23, the TSW24, and the system bus I/F section 25 of the CPU card 11 and by means ofcontrol of the analog/digital outside line card 14.

[0069] The foregoing explanation has described a common diagnosticoperation, and the details of diagnostic operations will differaccording to an object of diagnosis. Representative objects of diagnosisand their corresponding diagnostic operations are provided below.

[0070] (1) Analog Public Network Office Central Line: An outside line isspecified, and a zero call is originated. A resultant dial tone (DT)signal is then detected.

[0071] (2) ISDN Basic Line: After the KTS has been connected to an ISDNline, a call is originated to a dial-in office central line of the KTS 1or to an actual local telephone number. A resultant dial tone (DT)signal is then detected.

[0072] (3) G3 facsimile (NCU): A call is originated to the facsimilenumber of an intra-office facsimile through zero-call origination, and aresultant dial tone signal is detected.

[0073] (4) ISDN Telephone: A call is originated to an intra-office ISDNterminal through zero-call origination, and a resultant dial tone signalis detected.

[0074] (5) Digital Extension Line Terminal: After a line has been calledup by means of an automatic incoming call response request, callinformation (e.g., an extension number/presence or absence of anterminal/whether or not a line is engaged/whether or not the calledterminals is being rung). A tone signal is sent to the terminal that hasautomatically responded to the calling signal, thereby determiningwhether or not the received terminal is a speaker phone.

[0075] (6) Analog Extension Terminal (SLT): After an extension line hasbeen called up, a CNG signal is sent to thereby detect an ANS signal.

[0076] As has been mentioned above, by means of the rewriting of thediagnostic program and the diagnostic operation performed by thediagnostic program which are included in the remote maintenance functionaccording to the present embodiment, the existing diagnostic programpreviously stored in the memory 32 of the maintenance card 12 or anarbitrary diagnostic program downloaded from the maintenance site 2 isexecuted, and the result of such diagnosis is communicated to themaintenance site 2. Accordingly, even when the KTS 1 is installed in aremote location, a failure of the KTS1 can be immediately diagnosed atlow cost without direct dispatch of a service technician to the locationwhere the KTS 1 is installed. Further, a diagnostic program can berewritten from the maintenance site 2, and hence a relevant diagnosticprogram corresponding to the installation conditions of the KTS 1 or tothe failure of the KTS 1 can be flexibly and immediately provided andactivated.

[0077] As has been described above, in the key telephone system, the keytelephone system maintenance method, and the recording medium accordingto the present invention, the download means downloads a program to berewritten into the second storage means from the external device (in thedownload step), and the control means saves the program stored in thestorage means into the second storage means (in the saving step). Thecontrol means rewrites the downloaded program stored in the secondstorage means into the storage means through transmission (in therewriting step). As a result, there can be provided a key telephonesystem capable of immediately and inexpensively rewriting a program forcontrolling the operations of the key telephone system, a maintenancemethod for the key telephone system, and a medium recording a programfor executing the maintenance method.

[0078] Further, in the key telephone system, the key telephone systemmaintenance method, and the recording medium according to the presentinvention, the download means downloads a program to be rewritten intothe second storage means from the external device (in the downloadstep), and the control means saves the program stored in the storagemeans into the second storage means (in the saving step). The controlmeans rewrites the downloaded program stored in the second storage meansinto the storage means through transmission (in the rewriting step). Thefailure information recording means (in the failure informationrecording step) records information regarding at least failures thathave been caused by the downloading action of the download means (in thedownload step), failures that have been caused by the saving action ofthe control means (in the saving step), and failures that have beencaused by the rewriting action of the control means (in the rewritingstep). Further, in the event of a failure, the recovery means recoversthe key telephone system (in the recovery step) by reference to thefailure information recorded by the failure information recording means(in the failure information recording step). As a result, by referenceto the recorded failure information, a decision is made as to when afailure has occurred; i.e., in the download step, in the saving step,and in the rewriting step. The rewriting of the main program can beresumed from the processing step where the failure occurred. So long asthe processing is resumed from the processing step where the failureoccurred after recovery of the key telephone system, the time requiredto rewrite the program can be eventually shortened.

[0079] Further, in the key telephone system, the key telephone systemmaintenance method, and the recording medium according to the presentinvention, the download means downloads a program to be rewritten intothe second storage means from the external device (in the downloadstep), and the control means saves the existing program stored in thestorage means into another memory location of the second storage means(in the saving step). The control means rewrites the existing program inthe second storage means with the diagnostic program downloaded in thesecond storage means. According to the diagnostic program stored in thesecond storage means, the diagnostic means diagnoses the state of a lineconnected to the key telephone system through transmission and receiptof a signal (in the diagnosing step). Thus, the existing diagnosticprogram previously stored in the second storage means or an arbitrarydiagnostic program downloaded from a external device is executed. As aresult, even when a key telephone system is installed in a remotelocation, a failure of the key telephone system can be diagnosed. Morespecifically, the key telephone system can be immediately andinexpensively diagnosed without direct dispatch of a maintenancetechnician to the location where the key telephone system is installed.Further, since the diagnostic program can be changed by way of theexternal device, a relevant diagnostic program corresponding to thelocation—where the key telephone system is installed and a failure ofthe key telephone system—can be immediately and flexibly activated.

[0080] Further, in the key telephone system, the key telephone systemmaintenance method, and the recording medium according to the presentinvention, the result of processing performed by the control means (inthe rewriting step), and the failure information recorded in the failureinformation recording means (in the failure information recording step)or the result of diagnosis performed by the diagnostic means (in thediagnostic step) are preferably notified to the external device. Theexternal device is connected to the key telephone system by way of ananalog/digital network so as to remotely control the key telephonesystem. As a result, rewriting of the program of the key telephonesystem, the recovery of the key telephone system from a failure, andsystem diagnosis can be flexibly and immediately carried out withoutdirect dispatch of a maintenance technician to the location where thekey telephone system is installed. Thus, there can be provided a keytelephone system which enables rewriting of the main program of the keytelephone system, the recovery of the key telephone system from afailure, and system diagnosis in a remote, immediate, flexible, andinexpensive manner.

What is claimed is:
 1. A key telephone system comprising: first storage means which stores a program; operation control means which operates and controls the key telephone system through execution of the program stored in the first storage means; second storage means which stores an alternative program; downloading means which downloads from an external device the alternative program to be rewritten to the second storage means; and control means which saves the program stored in the first storage means into the second storage means and which transmits and rewrites the alternative program stored in the second storage into the first storage means.
 2. A key telephone system comprising: first storage means which stores a program; operation control means which operates and controls the key telephone system through execution of the program stored in the first storage means; second storage means which stores an alternative program; downloading means which downloads from an external device a program to be rewritten to the second storage means; control means which saves the program stored in the storage means into the second storage means and which transmits and rewrites the alternative program stored in the second storage into the first storage means; failure information recording means which records information regarding at least failures that occur during the downloading of the alternative program by the downloading means and failures that occur during the saving and rewriting of the programs by the control means; and recovery means which recovers the key telephone system by reference to the failure information recorded in the failure information recording means.
 3. A key telephone system comprising: first storage means which stores a program; operation control means which operates and controls the key telephone system through execution of the program stored in the first storage means; second storage means which stores a diagnostic program; downloading means which downloads from an external device an alternative diagnostic program to be rewritten to the second storage means; control means which saves a diagnostic program having been stored in a first area of the second storage means into a second area of the second storage means and which transmits and rewrites the alternative diagnostic program stored in the second area into the first area; and diagnostic means which diagnoses the state of a line connected to the key telephone system according to a diagnostic program stored in the second area the second storage means, through transmission and receipt of a signal.
 4. The key telephone system as defined in any one of claims 1 through 3, wherein the second storage means, the downloading means, the control means, the failure information recording means, and the recovery means or the diagnostic means are assembled into a single module and handled, as such.
 5. The key telephone system as defined in any one of claims 1 through 3, wherein the result of processing performed by the control means, and the failure information recorded in the failure information recording means or the result of diagnosis performed by the diagnostic means, are communicated to the external device.
 6. The key telephone system as defined in any one of claims 1 through 3, wherein the external device is connected to the key telephone system by way of an analog or digital network, so that the key telephone system is remotely controlled.
 7. A method of performing maintenance of a key telephone system comprising storage means which stores a program and operation control means which operates and controls the key telephone system through execution of the program stored in the storage means, the key telephone system maintenance method comprising: a download step for downloading from an external device an alternative program to be rewritten to second storage means; a saving step for saving the program stored in the storage means into the second storage means; and a rewriting step for transmitting and rewriting the downloaded program stored in the second storage means into the storage means.
 8. A method of performing maintenance of a key telephone system including storage means which stores a program and operation control means which operates and controls the key telephone system through execution of the program stored in the storage means, the key telephone system maintenance method comprising: a download step for downloading from an external device an alternative program to be rewritten to second storage means; a saving step for saving the program stored in the storage means into the second storage means; a rewriting step for transmitting and rewriting the alternative program stored in the second storage means into the storage means; a failure information recording step for recording information regarding at least failures that occur in the download step, the saving step, and the overwriting step, and a recovery step for recovering the key telephone system by reference to the failure information recorded in the failure information recording step.
 9. A method of performing maintenance of a key telephone system including storage means which stores a program and operation control means which operates and controls the key telephone system through execution of the program stored in the storage means, the key telephone system maintenance method comprising: a download step for downloading from an external device an alternative diagnostic program to be rewritten to second storage means; a saving step for saving an existing program having been stored in the storage means to the second storage means; a rewriting step for transmitting and rewriting the alternative program stored in the second storage means into the storage means; and a diagnosing step for diagnosing the state of a line connected to the key telephone system according to a diagnostic program stored in the second storage means, through transmission and receipt of a signal.
 10. The key telephone system maintenance method as defined in any one of claims 7 through 9, wherein the result of processing performed by the control means, and the failure information recorded in the failure information recording means or the result of diagnosis performed by the diagnostic means are communicated to the external device.
 11. The key telephone system maintenance method as defined in any one of claims 7 through 9, wherein the external device is connected to the key telephone system by way of an analog or digital network, so that the key telephone system is remotely controlled.
 12. A computer-readable recording medium storing a program for causing a computer to execute the key telephone system maintenance method as defined in any one of claims 7 through
 9. 